(function () {
  'use strict';

  angular
    .module('client')
    .controller('ExportController', ExportController);

  ExportController.$inject = ['$uibModalInstance', '$window', 'exportInfo'];
  function ExportController($uibModalInstance, $window, exportInfo) {
    var vm = this;
    vm.url = exportInfo.url;
    vm.fileName = exportInfo.fileName;
    vm.errorMsg = null;

    vm.download = download;
    vm.close = close;

    function download() {
      $uibModalInstance.close();
    }

    function close() {
      $uibModalInstance.dismiss('cancel');
    }

  }

}());
